/*
 * Copyright (c) 2011-2025 PiChen
 */

/**
 * Extension for Spring Framework based on Generic framework code included with
 * <a href="http://www.amazon.com/exec/obidos/tg/detail/-/1861007841/">Expert One-On-One J2EE Design and Development</a>
 * by Rod Johnson (Wrox, 2002).
 * This code is free to use and modify.
 * Please contact <a href="mailto:rod.johnson@interface21.com">rod.johnson@interface21.com</a>
 * for commercial support.
 */

package com.interface21.jdbc.core;

/**
 * JavaBean for holding JDBC Error Codes - loaded through BeanFactory
 * implementation. Used by the SQLExceptionTranslater.
 *
 * @author Thomas Risberg
 */
public class SQLErrorCodes {

    private String[] badSqlGrammarCodes = new String[0];

    private String[] dataIntegrityViolationCodes = new String[0];

    /**
     * Sets the badSqlGrammarCodes.
     */
    public void setBadSqlGrammarCodes(String[] badSqlGrammarCodes) {
        this.badSqlGrammarCodes = badSqlGrammarCodes;
    }

    /**
     * Returns the badSqlGrammarCodes.
     */
    public String[] getBadSqlGrammarCodes() {
        return badSqlGrammarCodes;
    }

    /**
     * Sets the dataIntegrityViolationCodes.
     */
    public void setDataIntegrityViolationCodes(String[] dataIntegrityViolationCodes) {
        this.dataIntegrityViolationCodes = dataIntegrityViolationCodes;
    }

    /**
     * Returns the dataIntegrityViolationCodes.
     */
    public String[] getDataIntegrityViolationCodes() {
        return dataIntegrityViolationCodes;
    }

}
